// 引入 request 文件
import request from '@/utils/request'
/**
 *
 * @description 查找群聊
 */
export const chatroomList = (name:string) => {
  return request({
    url: "chatroom/list",
    method: "get",
    data: {
      name
    },
  });
};
/**
 *
 * @description 查找聊天室
 */
export const findChatroom = (userId1: number, userId2: number) => {
  return request({
    url: "chatroom/findChatroom",
    method: "get",
    data: {
      userId1,
      userId2
    },
  });
};

/**
 *
 * @description 创建聊天室
 */
export const createRoom = (friendId: string) => {
    return request({
      url: "chatroom/create-one-to-one",
      method: "get",
      data: {
        friendId,
      },
    });
  };



